package com.allenlee.mvphelper.module.login;

import com.allenlee.mvphelper.base.IBasePresenter;
import com.allenlee.mvphelper.base.IBaseView;
import com.allenlee.mvphelper.base.bean.HttpResult;

import java.util.HashMap;

import io.reactivex.Flowable;

/**
 * @author : lifei
 * 创建时间： 19-11-27
 * 更改时间： 19-11-27
 * Email : allen.lee723@qq.com
 * @version :
 * Description：
 */
public interface LoginContract {

    String USER_NAME = "username";
    String PASSWORD = "password";

    interface Model {

        Flowable<HttpResult<LoginBean>> login(HashMap<String, String> params);

        /**
         * 模拟测试登录接口，使用 GET 方式
         */
        Flowable<HttpResult<LoginBean>> getLoginInfo();
    }

    interface View extends IBaseView {

        String getClientId();

        String getPassword();

        boolean isSaveAccount();

        void onLoginSuccess();
    }

    interface Presenter extends IBasePresenter {

        void login();

        void getLoginInfo();
    }
}
